package com.company.单例模式.优化后的懒汉模式;

public class Instance {
    private static class Inner{
        private static Instance instance=new Instance();
    }

    private Instance() {
        System.out.println("优化后的懒汉");
    }
    public static Instance getInstance(){
        return Inner.instance;
    }
}
